<%@page contentType="text/html;charset=utf-8"%>
<%@ taglib prefix="cw" uri="/widget-tags"%>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
	<head>
		<cw:base />
		<script type="text/javascript">
	function showInfo() {
		var searchgrid = Ext.getCmp('searchgrid');
		var id = searchgrid.getValue();
		Wonders.utils.formLoad('form', '../../../sample/combination/personinfo.load.action', {
			id :id
		});
	}
</script>
		<title>待遇享受人员录入</title>
	</head>
	<body>
		<li>
			<b>以下示例主要展現了一个比较常用的查询表单</b>
		</li>
		<li>
			<b>输入姓名（最小两位字符）->自动搜索->选择查询记录->显示人员详细信息</b>
		</li>
		<br>
		<br>
		<div id="search">
			<cw:form ajax="true" id="searchForm">
				<table>
					<tr>
						<td>
							搜索:
						</td>
						<td>
							<cw:gridSelect id="searchgrid" property="searchgrid1" fields="['id','name','sex','nation']" onSelect="showInfo"
								url="../../../sample/combination/personinfo.query.action" emptyText="请输入人名关键字..." displayField="name"
								width="200" valueField="id" pageSize="10" listWidth="450" autoComplete="true" queryParam="id">
								<cw:gridSelectColumn width="80" property="id" header="身份证号码" />
								<cw:gridSelectColumn width="100" property="name" header="姓名" />
								<cw:gridSelectColumn width="100" property="sex" header="性别" rendererData="[[1,'男'],[2,'女']]" />
								<cw:gridSelectColumn width="120" property="nation" header="民族" />
							</cw:gridSelect>
						</td>
					</tr>
				</table>
			</cw:form>
		</div>
		<cw:form ajax="true" id="form" method="post" url="../../../sample/form/ajaxSubmit.action">
			<tr>
			</tr>
			<cw:fieldSet content="fields" title="人员基础信息">
			</cw:fieldSet>
			<div id="fields">
				<TABLE width="800">
					<COLGROUP>
						<COL width='15%'>
						<COL width='15%'>
						<COL width='15%'>
						<COL width='15%'>
						<COL width='15%'>
						<COL width='15%'>
					</COLGROUP>
					<tr>
						<td align="right">
							<font color=red>*</font>身份证号码
						</td>
						<td>
							<cw:text property="idcard" readOnly="true" />
						</td>
						<td align="right">
							<font color=red>*</font>姓名
						</td>
						<td>
							<cw:text property="name" readOnly="true" />
						</td>
						<td align="right">
							性别
						</td>
						<td>
							<cw:combobox property="sex" data="[[1,'男'],[2,'女']]" editable="true" readOnly="true" />
						</td>
					</tr>
					<tr>
						<td align="right">
							出生日期
						</td>
						<td>
							<cw:dateField property="dateTime" readOnly="true" />
						</td>
						<td align="right">
							<font color=red>*</font>民族
						</td>
						<td>
							<cw:combobox property="nation" data="[[1,'汉族'],[2,'少数民族']]" editable="true" required="true" />
						</td>
						<td align="right">
							<font color=red>*</font> 户籍性质
						</td>
						<td>
							<cw:combobox property="census" editable="true" readOnly="true" data="[[1,'城镇户口'],[2,'农村户口']]" />
						</td>
					</tr>
					<tr>
						<td align="right">
							邮政编码
						</td>
						<td>
							<cw:number property="zip" allowDecimals="false" allowNegative="false" validateType="zipcode" />
						</td>
						<td align="right">
							联系电话
						</td>
						<td>
							<cw:number property="phone" maxLength="8" minLength="8" allowDecimals="false" allowNegative="false" />
						</td>
						<td align="right">
							电子邮箱
						</td>
						<td>
							<cw:text property="email" validateType="email" />
						</td>
					</tr>
					<tr style="width: 2002px">
						<td align="right">
							户籍所在地
						</td>
						<td>
							<cw:textArea property="censusAddress" />
						</td>
					</tr>
				</TABLE>
			</div>
			<cw:fieldSet content="fields_" title="人员辅助信息">
			</cw:fieldSet>
			<div id="fields_">
				<table width="800">
					<colgroup>
						<col width='15%'>
						<col width='15%'>
						<col width='15%'>
						<col width='15%'>
						<col width='15%'>
						<col width='15%'>
					</colgroup>
					<tr>
						<td align="right">
							<font color=red>*</font> 开卡类型
						</td>
						<td>
							<cw:combobox property="cardType" data="[[1,'借记卡'],[2,'信用卡']]" readOnly="true" editable="true" />
						</td>
						<td align="right">
							开卡银行
						</td>
						<td>
							<cw:combobox property="bankName" data="[[1,'中国银行'],[2,'工商银行'],[3,'建设银行'],[4,'邮政储蓄']]" editable="true" />
						</td>
						<td align="right">
							银行帐号
						</td>
						<td>
							<cw:text property="cardNumber" />
						</td>
					</tr>
					<tr>
						<td align="right">
							银行余额
						</td>
						<td>
							<cw:number property="cash" />
						</td>
					</tr>
				</table>
			</div>
		</cw:form>
		<table align="center">
			<tr>
				<td>
					<cw:formButton actionType="submit" formId="form" />
				</td>
				<td>
					<cw:formButton actionType="reset" formId="form" />
				</td>
			</tr>
		</table>
	</body>
	<cw:theme></cw:theme>
</html>
